package it.diego.projecttwo;

import java.util.ArrayList;
import java.util.Collection;

import android.os.Bundle;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.slidingmenu.lib.SlidingMenu;
import com.slidingmenu.lib.SlidingMenuActivity;

public class SlidingActivity extends SlidingMenuActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sliding);
        setBehindContentView(R.layout.sliding2);
        setBehindOffset(150);
		setBehindScrollScale(0.5f);
		
	
		SlidingMenuList listSecondActivity = new SlidingMenuList(this);
		String[] Countries = getResources().getStringArray(R.array.Game);
		Collection coll = new ArrayList();
		for (int i = 0; i < Countries.length; i++) {
			coll.add(Countries[i]);
		}
		
		SlidingMenuListAdapter adapter = new SlidingMenuListAdapter(this);
		MenuListItem menulistitem = new MenuListItem("Menu di sliding");
		adapter.add(menulistitem);
		adapter.addAll(coll);
//		SlidingMenu menu = new SlidingMenu(this);
		listSecondActivity.setAdapter(adapter);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.sliding, menu);
        return true;
    }
}
